#ifndef MONITOR_ACCOUNT_MANAGER_WINDOWS_H_
#define MONITOR_ACCOUNT_MANAGER_WINDOWS_H_
#include <gtkmm/button.h>
#include <gtkmm/window.h>
#include <gtkmm/box.h>
#include <gtkmm/notebook.h>
#include "monitor_create_account.h"
#include "monitor_delete_account.h"
#include "monitor_edit_account.h"
#include "monitor_view_accounts.h"
using namespace std;
class AccountManager: public Gtk::Window {
public:
	AccountManager(Monitor* m) :
			create_button("Create account"), edit_button("Edit account"), delete_button(
					"Delete account"), view_button("View accounts"), box(true,
					40) {
		set_title("Accounts Manager");
		set_size_request(200, 200);
		set_modal(true);
		this->m = m;
		create_button.signal_clicked().connect(
				sigc::mem_fun(*this, &AccountManager::on_create_clicked));
		edit_button.signal_clicked().connect(
				sigc::mem_fun(*this, &AccountManager::on_edit_clicked));
		delete_button.signal_clicked().connect(
				sigc::mem_fun(*this, &AccountManager::on_delete_clicked));
		view_button.signal_clicked().connect(
				sigc::mem_fun(*this, &AccountManager::on_view_clicked));
		add(box);
		box.pack_start(create_button);
		box.pack_start(edit_button);
		box.pack_start(delete_button);
		box.pack_start(view_button);
		show_all_children();

	}
	void on_create_clicked() {
		CreateAccount c(m);
		Gtk::Main::run(c);
	}
	void on_edit_clicked() {
		EditAccount e(m);
		Gtk::Main::run(e);
	}
	void on_delete_clicked() {
		DeleteAccount d(m);
		Gtk::Main::run(d);
	}
	void on_view_clicked() {
		ViewAccounts v(m);
		Gtk::Main::run(v);
	}

private:
	Gtk::VBox box;
	Gtk::Button create_button, edit_button, delete_button, view_button;
	Monitor* m;
};

#endif /* ACCOUNT_MANAGER_WINDOWS_H_ */
